<?php 


// == Set all setings =====================

function setData()
{
	setMenus();
	setDemoOptions();
	setWidgets();
	setMedia();
}

// == Set media ==========================================

function setMedia()
{
	$p_slides =   array ( 
	   "src" => URL."/sprites/i/demo.png",
	   "link" => "",  "description" => "" , "type" => "upload" , 
	   "title" => "" );
	 
	 $path = __FILE__;
     $pathwp = explode( 'wp-content', $path );
     $wp_url = $pathwp[0]."wp-content/uploads/demo.png";

	 $cstatus =   copy( TEMPLATEPATH."/sprites/i/demo.png",  $wp_url  );
	
	 $wp_query = new WP_Query("post_type=post&posts_per_page=-1");
	 
	 while ( $wp_query->have_posts() ) : $wp_query->the_post();
	 
	 $id =  get_the_ID();
	 
	 update_post_meta($id,"_dynamic_sidebar","Blog Sidebar");
	 
	 if($cstatus) {
	 
	 $filename = "demo.png";
	 $wp_filetype = wp_check_filetype(basename($filename), null );
     $attachment = array(
     'post_mime_type' => $wp_filetype['type'],
     'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
     'post_content' => '',
     'post_status' => 'inherit'
      );
      $attach_id = wp_insert_attachment( $attachment, $filename, $id );
      require_once(ABSPATH . 'wp-admin/includes/image.php');
      $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
      wp_update_attachment_metadata( $attach_id, $attach_data );
      set_post_thumbnail($id,   $attach_id );
	 }
	 
	 
	endwhile;
	
	
}

// == Set Widgets =========================================
function setWidgets()
{


$sidebars = get_option("sidebars_widgets");
$sidebars["sidebar-1"] = array("ads300-2","socialicons-2","search-2","fblike-2","tag_cloud-2","recent-comments-2","tabbedwidget-2","twitter_widget-3");
$sidebars["sidebar-2"] = array ( "twitter_widget-2" , "feedburnersubscribe-2");
$sidebars["sidebar-3"] = array ( "categories-2" , "links-2");
$sidebars["sidebar-4"] = array ( "tag_cloud-2" , "contactform-2");

      
update_option("sidebars_widgets",$sidebars);

$search = get_option("widget_search");	
$search[2] =array("title" => "");
$search["_multiwidget"] =   1 ;
update_option("widget_search",$search);

$ads300 = get_option("widget_ads300");	
$ads300[2] =array("title" => "", "image_url" => URL."/sprites/i/demo.png" , "url"=>"#");
$ads300["_multiwidget"] =   1 ;
update_option("widget_ads300",$ads300);

$socialicons = get_option("widget_socialicons");	
$socialicons[2] =array("title" => "", "fb_link" => "#", "google_link" => "#", "twitter_link" => "#" );
$socialicons["_multiwidget"] =   1 ;
update_option("widget_socialicons",$socialicons);


$tabbed = get_option("widget_tabbedwidget");	
$tabbed[2] = array("title" => "");
$custom_box["_multiwidget"] =   1 ;
update_option("widget_tabbedwidget",$tabbed);

$fblike = get_option("widget_fblike");	
$fblike[2] = array("title" => "Facebook","fb_link"=>"https://www.facebook.com/wptitans","width"=>"290","show_friends"=>"true");
$fblike["_multiwidget"] =   1 ;
update_option("widget_fblike",$fblike);


$custom_box = get_option("widget_custombox");	
$custom_box[2] =array(
	"link" => "",
	"description" => "Fusce feugiat posuere congue. Etiam laoreet odio nec eros interdum laoreet. Aliquam ullamcorper porttitor sapien, eget vulputate dui interdum id. Vivamus et eros magna. 

Nam sed justo id leo lobortis accumsan. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.",
	"title" => "About us",
	"intro_image_link" => ""
	
	
	);
 			 
$custom_box["_multiwidget"] =   1 ;
update_option("widget_custombox",$custom_box);
		

$twitter = get_option("widget_twitter_widget");	
$twitter[2] =array("title" => "Latest from Twitter" , "username" => "WPTitan", "tweet_count" => 3);
$twitter[3] =array("title" => "Latest from Twitter" , "username" => "Envato", "tweet_count" => 4);
$twitter["_multiwidget"] =   1 ;
update_option("widget_twitter_widget",$twitter);


$feeds = get_option("widget_feedburnersubscribe");	
$feeds[2] =array("link" => "nettuts" , "description" => "Sed diam metus, porttitor eget viverra vel, posuere eget purus. Donec libero nunc, ornare quis ultricies non, viverra eu metus. Vestibulum pulvinar, lorem sit amet eleifend pulvinar, purus augue congue quam.", "title" => "Subscribe to our feeds" );
$feeds["_multiwidget"] =   1 ;
update_option("widget_feedburnersubscribe",$feeds);


$categories = get_option("widget_categories");	
$categories[2] =array("title" => "Categories" , "count" => "1", "hierarchical" => "0" , "dropdown" =>"0");
$categories["_multiwidget"] =   1 ;
update_option("widget_categories",$categories);		
		
	
$links = get_option("widget_links");	
$links[2] = array( "images" => 1 , "name" => 1 , "description" =>  0 ,"rating" => 0, "category" => 0);
$links["_multiwidget"] =   1 ;
update_option("widget_links",$links);		

$tags = get_option("widget_tag_cloud");	
$tags[2] = array( "title" => "Tags " , "taxonomy" => "post_tag");
$tags["_multiwidget"] =   1 ;
update_option("widget_tag_cloud",$tags);	


$contact = get_option("widget_contactform");	
$contact[2] = array(
"title" => "Quick Contact",
"email" => "test@testingemail.com",
 "messsage" =>""

);
$contact["_multiwidget"] =   1 ;
update_option("widget_contactform",$contact);

}
function setMenus()
{
	$gmes = "Menus ";
	global $wpdb;
    $table_db_name = $wpdb->prefix . "terms";
    $rows = $wpdb->get_results("SELECT * FROM $table_db_name where name='Footer Menu' OR name='Main Menu' OR name='Top Menu'",ARRAY_A);
    $menu_ids = array();
	foreach($rows as $row)
	$menu_ids[$row["name"]] = $row["term_id"] ; 

    set_theme_mod( 'nav_menu_locations', array_map( 'absint', array( 'top_nav' => $menu_ids['Top Menu'] , 'primary_nav' =>$menu_ids['Main Menu'] ,'footer_nav' => $menu_ids['Footer Menu']) ) );
	
	
	
}

// == Set Media Content ==============================================

function setMediaContent() {

 $gmes = "Media Items ( portfolios and galleries ) ";
	 
	  $p_slides =   array ( 
	   "src" => URL."sprites/i/demo.png",
	   "link" => "",  "description" => "" , "type" => "upload" , 
	   "title" => "" );
	 
	  $cstatus =   copy( TEMPLATEPATH."/images/demo.png",  $wp_url  );
	 
	  $wp_query = new WP_Query("post_type=portfolio&posts_per_page=-1");
	 
	  while ( $wp_query->have_posts() ) : $wp_query->the_post();
	 
		   $no = rand(2,7);
		   $portfolio_slides = array();
		   for($i=0;$i<$no;$i++)
		   $portfolio_slides[] = $p_slides;
	 
		   $id =  get_the_ID();
		   update_post_meta($id,"gallery_items",$portfolio_slides);
	 
		   if($cstatus) {
		   
		   $filename = "demo.png";
		   $wp_filetype = wp_check_filetype(basename($filename), null );
		   $attachment = array(
		   'post_mime_type' => $wp_filetype['type'],
		   'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
		   'post_content' => '',
		   'post_status' => 'inherit'
			);
			$attach_id = wp_insert_attachment( $attachment, $filename, $id );
			
			require_once(ABSPATH . 'wp-admin/includes/image.php');
			
			$attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
			wp_update_attachment_metadata( $attach_id, $attach_data );
			set_post_thumbnail($id,   $attach_id );
		   }
	 
	 
	endwhile;
	
	
}

// == Enable Demo Content ===========================

function setDemoContent()
{
	if ( !defined('WP_LOAD_IMPORTERS') ) define('WP_LOAD_IMPORTERS', true);
	require_once ABSPATH . 'wp-admin/includes/import.php';
    $importer_error = false;
	
	if ( !class_exists( 'WP_Importer' ) ) {
	$class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php';
		if ( file_exists( $class_wp_importer ) )
		{
			require_once($class_wp_importer);
		}
		else
		{
			$importer_error = true;
		}
    }
	
	if ( !class_exists( 'WP_Import' ) ) {
	  $class_wp_import = HPATH . '/mods/odin/importer/wordpress-importer.php';
	  if ( file_exists( $class_wp_import ) )
	  require_once($class_wp_import);
	  else
	  $importerError = true;
	  
    }

	  if($importer_error)
	  {
		  die("Error in import :(");
	  }
	  else
	  {
		  if ( class_exists( 'WP_Import' )) 
		  {
			  include_once('importer/odin-import-class.php');
		  }
		  
		  
		  if(!is_file(HPATH."/mods/odin/dummy.xml"))
		  {
			  echo "The XML file containing the dummy content is not available or could not be read in <pre>".HPATH."</pre><br/> You might want to try to set the file permission to chmod 777.<br/>If this doesn't work please use the wordpress importer and import the XML file from hades_framework -> mods -> odin folder , dummy.xml manually <a href='/wp-admin/import.php'>here.</a>";
		  }
		  else
		  {
	  
			  $wp_import = new odin_wp_import();
			  $wp_import->fetch_attachments = true;
			  $wp_import->import(HPATH."/mods/odin/dummy.xml");
			  $wp_import->sa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0OFwiO3M6MTA6XCJtZWRpYV90eXBlXCI7czo1OlwidmltZW9cIjt9fX19XCI7In0seyJvcHRpb25fbmFtZSI6IkJMT19hY2NvcmRpb25fcG9zdHMiLCJvcHRpb25fdmFsdWUiOiI0In0seyJvcHRpb25fbmFtZSI6IkJMT19mZWF0dXJlZF9wb3N0cyIsIm9wdGlvbl92YWx1ZSI6IjMifSx7Im9wdGlvbl9uYW1lIjoiQkxPX2JnX3JlcGVhdCIsIm9wdGlvbl92YWx1ZSI6InJlcGVhdCJ9LHsib3B0aW9uX25hbWUiOiJibG9nX3VwbG9hZF9zcGFjZSIsIm9wdGlvbl92YWx1ZSI6IiJ9LHsib3B0aW9uX25hbWUiOiJCTE9fYmdfcG9zaXRpb24iLCJvcHRpb25fdmFsdWUiOiJ0b3AgbGVmdCJ9LHsib3B0aW9uX25hbWUiOiJCTE9fdHdpdHRlcl9saW5rIiwib3B0aW9uX3ZhbHVlIjoiIyJ9LHsib3B0aW9uX25hbWUiOiJCTE9fZmJfbGluayIsIm9wdGlvbl92YWx1ZSI6IiMifSx7Im9wdGlvbl9uYW1lIjoiQkxPX3Jzc19saW5rIiwib3B0aW9uX3ZhbHVlIjoiIyJ9LHsib3B0aW9uX25hbWUiOiJCTE9fbGlua2VkX2xpbmsiLCJvcHRpb25fdmFsdWUiOiIjIn0seyJvcHRpb25fbmFtZSI6IkJMT19zdHVtYmxlX2xpbmsiLCJvcHRpb25fdmFsdWUiOiIjIn0seyJvcHRpb25fbmFtZSI6IkJMT19ob21lX3Bvc3RzIiwib3B0aW9uX3ZhbHVlIjoiMTYifSx7Im9wdGlvbl9uYW1lIjoiQkxPX3N0eWxlX2xpc3RlbmVyIiwib3B0aW9uX3ZhbHVlIjoiRGVmYXVsdCJ9LHsib3B0aW9uX25hbWUiOiJCTE9fcGxhaW5fdGhlbWUiLCJvcHRpb25fdmFsdWUiOiJTb3VyIn1d ";

$theme_options = base64_decode($theme_options);	
$theme_options = str_replace("hades","AVE",$theme_options);
$input = json_decode($theme_options,true);

	
foreach($input as $key => $val)
update_option($val["option_name"],$val["option_value"]);

$slider_options = array("jQuery Slider","HTML5 Slider","Fade Slider");

$sliders = array();


for($i=1;$i<4;$i++)
{
	$sl = array();
	for($j=0;$j<5;$j++)
	{
		$sl[] =  array
                        (
						 "media_type" => "image",
						 "stage_option" => $opts[rand(0,2)],
                            "slide_title" => "Pellentesque nec cursus nisl.",
                            "slide_link" => "#",
                            "slide_image" => URL."/sprites/i/demo.png",
                            "description" => "Vestibulum accumsan tristique massa, ac aliquam augue volutpat eget. Donec justo eros, gravida tristique ornare sit amet, rhoncus a leo. Nulla facilisi. Integer rutrum nisl eros. "
                        );
	}
	
	$sliders["Slider {$i}"] = array(
	        "title" => "Slider {$i}",
            "width" => 630,
            "height" => 305,
            "type" => $slider_options[$i-1],
            "interval" => "5",
            "autoplay" => "true",
			"desc" => "true",
            "controls" => "true" ,
			"slides" => $sl
	);
}


 $category_ids = get_all_category_ids();
 $selectable = 1;	
 
 $setlings = array();
 $setlings[] = $category_ids[0].":".$category_ids[1].":".$category_ids[2];
 $setlings[] = $category_ids[3];
 $setlings[] = $category_ids[4];
 $setlings[] = $category_ids[5].":".$category_ids[6].":".$category_ids[7];
 
	foreach($category_ids as $cat_id) {
  		$cat_name = get_cat_name($cat_id);
  		if($cat_name=="Software") $selectable = $cat_id;
		
		
			}
 
$force_option = array(

SN."_active_sidebars" =>  array ( "Right Sidebar" ,"Right Sidebar 2","Right Sidebar 1 "),
SN."_logo" => URL."/sprites/i/logo.png",
SN."_forms" => array(),
SN."_home_slider" => $selectable,
SN."_home_sidebar" => "Blog Sidebar",
SN."_sliders" => serialize($sliders),
SN."_author_sidebar" =>  "Blog Sidebar",
SN."_archives_sidebar" =>  "Blog Sidebar",
SN."_category_sidebar" =>  "Blog Sidebar",
SN."_search_sidebar" =>  "Blog Sidebar",
SN."_tag_sidebar" =>  "Blog Sidebar",
SN."_tracking_code" => "",
SN."_layouts" => serialize(array
(
    array ( "widget_name" => "three-columns" , "category_id" => $setlings[0]    ),
    array ( "widget_name" => "posts-image" ,   "category_id" => $setlings[1]       ),
    array ( "widget_name" => "full-accordion" ,  "category_id" => $setlings[2] ),
    array ( "widget_name" => "three-columns" ,   "category_id" => $setlings[3]  )

))
);
	
	foreach($force_option as $k => $v)
    update_option($k,$v);	
	

 
 		
}